<template>
    <div class="history">
        <!-- 头部导航 -->
        <van-nav-bar class="bc" title="我的足迹" left-text="返回"  left-arrow @click-left="onClickLeft" fixed>
            <template #right>
                <van-button size="mini" class="button" @click="Delete">全部删除</van-button>
            </template>
        </van-nav-bar>
        <div class="his_content" v-if="$store.state.islogin">
            <van-card
                price="37.80"
                desc="1万+人浏览..."
                title="东方葵园南汇8424西瓜水果1个装净重3kg包熟包甜顺丰包邮"
                thumb="https://img.alicdn.com/imgextra/i3/725677994/O1CN01OocmLs28vIprFguJw_!!725677994-0-sm.jpg_430x430q90.jpg"
                v-show="isshow_1"
                >
                <template #tags>
                    <van-tag plain type="danger">皮薄肉脆</van-tag>
                    <van-tag plain type="danger">甜蜜多汁</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_1">删除</van-button> 
                </template>
                </van-card>
                <van-card
                price="28.80"
                desc="9845人浏览过"
                title="8424麒麟小西瓜新鲜水果整箱无籽薄皮当季迷你应季麒麟瓜孕妇5斤"
                thumb="//img.alicdn.com/bao/uploaded/i1/2211750147945/O1CN01u4ol8w28YrQbzSz2A_!!0-item_pic.jpg"
                v-show="isshow_2"
                >
                <template #tags>
                    <van-tag plain type="danger">包熟包甜</van-tag>
                    <van-tag plain type="danger">坏瓜包赔</van-tag>
                    <van-tag plain type="danger">今日拍下送勺子</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_2">删除</van-button>
                </template>
                </van-card>
                <van-card
                price="108.80"
                desc="73人浏览过"
                title="上海南汇西瓜8424西瓜2个装10-12斤斤西瓜水果南汇西瓜新鲜水果"
                thumb="//img.alicdn.com/bao/uploaded/i1/3120112518/O1CN01GoV32U1UTHy1rvn94_!!3120112518.jpg"
                v-show="isshow_3"
                >
                <template #tags>
                    <van-tag plain type="danger">肉质松嫩</van-tag>
                    <van-tag plain type="danger">清爽解渴</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_3">删除</van-button>
                </template>
                </van-card>
                <van-card
                price="76.00"
                desc="8437人浏览过"
                title="福建玉荷包荔枝5斤新鲜应当季水果现摘时令特产小核荔枝顺丰3包邮"
                thumb="//img.alicdn.com/bao/uploaded/i4/3015214310/O1CN01zUOyWQ1hi1jcFotIe_!!3015214310.jpg"
                v-show="isshow_4"
                >
                <template #tags>
                    <van-tag plain type="danger">新鲜采摘</van-tag>
                    <van-tag plain type="danger">滑嫩爽口</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_4">删除</van-button>
                </template>
                </van-card>
                <van-card
                price="299.00"
                desc="34人浏览过"
                title="【蜜丁香】荔枝王新鲜5斤当季水果妃子笑桂味现摘漳州海南包邮10"
                thumb="//img.alicdn.com/bao/uploaded/i4/2208439989784/O1CN01UdZlSG2M97mxVvxaV_!!2208439989784.jpg"
                v-show="isshow_5"
                >
                <template #tags>
                    <van-tag plain type="danger">高端品种</van-tag>
                    <van-tag plain type="danger">无核荔枝</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_5">删除</van-button>
                </template>
                </van-card>
                <van-card
                price="108.00"
                desc="1万+人浏览过"
                title="[正宗大果]无锡阳山水蜜桃新鲜水果5两12装整箱现摘现发白凤桃子"
                thumb="//img.alicdn.com/bao/uploaded/i4/3214437542/O1CN01slvVDa25aHo2R8dHl_!!3214437542.jpg"
                v-show="isshow_6"
                >
                <template #tags>
                    <van-tag plain type="danger">个大爆汁</van-tag>
                    <van-tag plain type="danger">味甜肉厚</van-tag>
                </template>
                <template #footer>
                    <van-button size="mini" class="button" @click="Delete_6">删除</van-button>
                </template>
                </van-card>
        </div>
        <van-empty v-else  description="亲，您还没有登录哟！" />
    </div>
</template>

<script>
export default {
  data() {
    return {
        isshow_1:true,
        isshow_2:true,
        isshow_3:true,
        isshow_4:true,
        isshow_5:true,
        isshow_6:true
    }
  },
  mounted() {
  },
  methods: {
    onClickLeft() {
      this.$router.push("/me");
    },
    Delete_1(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_1=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_1=true
    });
    },
    Delete_2(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_2=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_2=true
    });
    },
    Delete_3(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_3=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_3=true
    });
    },
    Delete_4(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_4=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_4=true
    });
    },
    Delete_5(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_5=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_5=true
    });
    },
    Delete_6(){
      this.$dialog.confirm({
      title: '确认删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_6=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_6=true
    });
    },
    Delete(){
      this.$dialog.confirm({
      title: '确认全部删除？',
    })
    .then(() => {
    // on confirm
      this.isshow_1=false,
      this.isshow_2=false,
      this.isshow_3=false,
      this.isshow_4=false,
      this.isshow_5=false,
      this.isshow_6=false
    
    })
    .catch(() => {
      // on cancel
      this.isshow_1=true,
      this.isshow_2=true,
      this.isshow_3=true,
      this.isshow_4=true,
      this.isshow_5=true,
      this.isshow_6=true
    });
    },
   },
};
</script>

<style>
.history .his_content{
    position: relative;
    top: 56px;
}
.history .bc {
    background: #f1f1f1;
}
.history .bk {
    margin-left: 20px;
}

.history .p {
    text-align: justify;
    text-justify: inter-ideograph;
    float: left;
}
</style>